using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization;
using Project_Schedule.Model.EntitiesHelper;

namespace Project_Schedule.Model.Entities;

[Table("schedule_user")]
public class System_User : ModelBase
{
    /// <summary>
    /// 账户
    /// </summary>
    [Required]
    [MaxLength(25)]
    public string? Account { get; set; }

    /// <summary>
    /// 名字
    /// </summary>
    [MaxLength(10)]
    public string? Name { get; set; }

    /// <summary>
    /// 密码
    /// </summary>
    [Required]
    [MaxLength(250)]
    [JsonIgnore]
    public string? Password { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    public DateTime CreateTime { get; set; }

    /// <summary>
    /// 职位
    /// </summary>
    public Schedule_User_Post_Enum Post { get; set; }

    /// <summary>
    /// 头像
    /// </summary>
    [MaxLength(50)]
    public string? Header { get; set; }

    /// <summary>
    /// 性别
    /// </summary>
    public Schedule_User_Sex_Enum Sex { get; set; }

    /// <summary>
    /// 手机号
    /// </summary>
    [Required]
    [MaxLength(50)]
    public string? Phone { get; set; }

    /// <summary>
    /// 邮箱
    /// </summary>
    [Required]
    [MaxLength(50)]
    public string? Email { get; set; }

    /// <summary>
    /// 在职状态
    /// </summary>
    [JsonIgnore]public Schedule_User_State_Enum Status { get; set; }

    /// <summary>
    /// 是否可以使用
    /// </summary>
    [JsonIgnore]
    public System_Audit_Status_Enum IsUsed { get; set; }

    /// <summary>
    /// 错误码 查询凭证
    /// </summary>
    [MaxLength(200)]
    [JsonIgnore]
    public string? ErrorCode { get; set; }
}